<!--# include virtual="/admin/common/html/header.html"-->
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 信息价管理 <span class="c-gray en">&gt;</span> 信息价管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c">
		地区：
	 	<span class="select-box inline">
		<select name="" class="select">
			<option value="0">省份</option>
			<option value="1">北京市</option>
			<option value="2">河北省</option>
		</select>
		</span> 
		专业：
		<span class="select-box inline">
		<select name="" class="select">
			<option value="0">专业</option>
			<option value="1">房建</option>
			<option value="2">公路</option>
		</select>
		</span> 
		年月：	
		<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM'})" id="logmin" class="input-text Wdate" style="width:120px;">
		<!--<input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'logmin\')}',maxDate:'%y-%M' })" id="logmax" class="input-text Wdate" style="width:120px;">-->
		期数：
		<span class="select-box inline">
		<select name="" class="select">
			<option value="0">北京市2014年01月份信息价</option>
			<option value="1">北京市2014年02月份信息价</option>
			<option value="2">北京市2014年03月份信息价</option>
		</select>
		</span> 
		<button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i>查询</button>
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<span class="l">
		<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i>批量剔除</a> 
		<a class="btn btn-primary radius"  id="input"  href="javascript:;">
			<i class="Hui-iconfont"  style="font-size: 18px;">&#xe645;</i>批量引入
		</a>
		</span> 
		<span class="r">共有数据：<strong>54</strong> 条</span> 
	</div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="80">ID</th>
					<th>材料名称</th>
					<th width="80">规格型号</th>
					<th width="80">分类</th>
					<th width="10">单位</th>
					<th width="60">含税价格</th>
					<th width="60">除税价格</th>
					<th width="60">最低价格</th>
					<th width="60">最高价格</th>
					<th width="75">更新时间</th>
					<th width="60">备注</th>
					<th width="100">操作</th>
				</tr>
			</thead>
			<tbody>
				<tr class="text-c">
					<td><input type="checkbox" value="" name=""></td>
					<td>10001</td>
					<td class="text-l"><u style="cursor:pointer" class="text-primary" onClick="article_edit('查看','article-zhang.html','10001')" title="查看">球墨铸铁上水双承单支盘丁字三通</u></td>
					<td>800*400</td>
					<td>人工</td>
					<td>个</td>
					<td>2650</td>
					<td>2650</td>
					<td>2650</td>
					<td>2650</td>
					<td>21212</td>
					<td class="td-status"><span class="label label-success radius">已发布</span></td>
					<td class="f-14 td-manage">
						<a style="text-decoration:none" class="ml-5" onClick="article_edit('编辑','article-add.html','10001')" href="javascript:;" title="编辑">
							<i class="Hui-iconfont">&#xe6df;</i>
						</a> 
						<a style="text-decoration:none" class="ml-5" onClick="article_del(this,'10001')" href="javascript:;" title="删除">
							<i class="Hui-iconfont">&#xe6e2;</i>
						</a>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
<div  id="message"></div>

<!--# include virtual="/admin/common/html/_footer.html"-->
<script type="text/javascript">
var uploader = WebUploader.create({
        swf: '/admin/lib/webuploader/0.1.5/Uploader.swf',
		server: 'http://localhost:8080/guidance_service/front/info/input.do',  // 文件接收服务端。
        auto : true,
        pick : "#input",
        resize : false,
        chunked: true
});
uploader.on( 'uploadSuccess', function( file,response) {
	if(response.resultCode == 200){
		layer.msg(response.message,{icon:1,time:3000},function(){
			location.replace(location.href);
		});
	}else if(response.resultCode  == 400){
		layer.open({  //页面层
		  type: 1,
		  title:"等待确认：",
		  skin: 'layui-layer-rim', //加上边框
		  area: ['420px', '420px'], //宽高
		  content: response.data.toString().replace(new RegExp(/(是否导入,)/g),"是否导入<br/>"),
		  btn: ['确认导入', '取消导入'],
		  yes: function(index, layero){ //按钮【按钮一】的回调
		  	   $.post("http://localhost:8080/guidance_service/front/info/confirm.do",{"UUID":response.ext},function(reslut){
		  	   		layer.msg(reslut.message,{icon:2,time:3000},function(){
						location.replace(location.href);
					});
		  	   });
		   	   layer.close(index); //如果设定了yes回调，需进行手工关闭
		  }
		});
	}else{
		layer.msg(response.message,{icon:2,time:3000},function(){
			location.replace(location.href);
		});
	}
	
});
uploader.on( 'uploadError', function( file ) {  //上传失败
	layer.msg('导入失败',{icon:2,time:1000},function(){
			location.replace(location.href);
	});
});
</script> 
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"pading":false,
	"aoColumnDefs": [
	  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
	  {"orderable":false,"aTargets":[0,2,3,5,8,11]}// 不参与排序的列
	]
});
</script> 
<script type="text/javascript">
function article_add(title,url,w,h){  /*资讯-添加*/
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}

function article_edit(title,url,id,w,h){  /*资讯-编辑*/
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}

function article_del(obj,id){     /*资讯-删除*/
	layer.confirm('确认要删除吗？',function(index){
		$.ajax({
			type: 'POST',
			url: '',
			dataType: 'json',
			success: function(data){
				$(obj).parents("tr").remove();
				layer.msg('已删除!',{icon:1,time:1000});
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}
</script> 
</body>
</html>